updating oE crash
Errors and Warnings
Routines
crash
include error.e namespace error public procedure crash(sequence fmt, object data = {})
crashes the running program and displays a formatted error message.
Parameters:
- fmt : a sequence representing the message text. It may have format specifiers in it
- data : an object, defaulted to {}.
Comments:
Formatting is the same as with printf.
The actual message being shown, both on standard error and in ex.err (or whatever file last passed to crash_file), is sprintf(fmt, data). The program terminates as for any runtime error.
Example 1:
if PI = 3 then crash("The structure of universe just changed -- reload solar_system.ex") end if
Example 2:
if token = end_of_file then crash("Test file #%d is bad, text read so far is %s\n", {file_number, read_so_far}) end if
See Also:
Not Categorized, Please Help
|